let XMLHttpRequest = require('xhr2');  //npm install xhr2

let request_url = "https://mdn.github.io/learning-area/javascript/oojs/json/superheroes.json";

let request = new XMLHttpRequest();

request.open('GET', request_url);

request.responseType = 'text';

request.send();

request.onload = function(){
    let content_text = request.response;
    let content_json = JSON.parse(content_text);
    console.log("here");
    console.log(content_json);
}
